//
//  DestTabBarTwoImageCollectionViewCell.m
//  TravelEveryDay
//
//  Created by dlios on 15/10/16.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "DestTabBarTwoImageCollectionViewCell.h"
#import "BaseHeader.h"
@implementation DestTabBarTwoImageCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.destTabBarImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        _destTabBarImageView.layer.cornerRadius = 10;
        _destTabBarImageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_destTabBarImageView];
        _destTabBarLabel = [[UILabel alloc]initWithFrame:CGRectMake(15 *WIDTH, frame.size.height - 40*HEIGHT , frame.size.height-20 *WIDTH,30*HEIGHT)];
        _destTabBarLabel.textColor = [UIColor colorWithWhite:1.000 alpha:1.000];
        _destTabBarLabel.shadowColor = [UIColor lightGrayColor];
        _destTabBarLabel.shadowOffset = CGSizeMake(0.5, 0.5);
        [self.contentView addSubview:_destTabBarLabel];
    }
    return self;
}
#pragma mark - 重写set方法 赋值
- (void)setDestModel:(DestTabBarModel *)destModel {
    NSURL *url = [NSURL URLWithString:destModel.cover_s ];
    [_destTabBarImageView sd_setImageWithURL:url placeholderImage:PLACEHOLDERIMAGE];
    _destTabBarLabel.text = destModel.name;
}
@end
